package com.example.takeaway.exception;

import com.example.takeaway.common.ResponseEnum;
import lombok.Getter;

/**
 * @author 邢晨旭
 * {@code @date} 2023/10/12
 */
@Getter
public class BusException extends RuntimeException {

    private final ResponseEnum responseEnum;

    public BusException(String message) {
        super(message);
        this.responseEnum = ResponseEnum.ERROR;
    }

    public BusException(ResponseEnum responseEnum) {
        super(responseEnum.getMessage());
        this.responseEnum = responseEnum;
    }

}
